package com.study.zouchao.superproject.modifyuserinfo.contract;

import android.content.Intent;

import com.study.zouchao.superproject.login.model.entity.User;
import com.study.zouchao.superproject.modifyuserinfo.model.entity.updateinfo.ModifyUserInfoResult;

import java.util.Map;

import rx.Observable;

/**
 * Created by Administrator on 2017/1/29.
 */

public interface IModifyUserInfoContract {
    interface IModifyUserInfoModel {
        Observable<ModifyUserInfoResult> saveModifyUserInfo(Map<String, String> params);
    }
    interface IModifyUserInfoPresenter {
        //点击确认更改按钮
        void confirmModify(String nickname, String sex, String location);
        //用户点击选择图片提示框
        void clickChoosePicDialog(int itemIndex);
        //显示之前用户的个人信息
        void initUserInfo();
        //view销毁时调用
        void onDestoryPresnter();
        //onActivityResult
        void judgeActivityResult(int requestCode, int resultCode, Intent data);
    }
    interface IModifyUserInfoView {
        //显示base的loading
        void showBaseLoading(boolean isShow);
        //当点击头像时弹出一个选项框选择是从哪里取图片
        void showChoosePicDialog();
        //设置昵称
        void setNickname(String nickname);
        //设置性别
        void setSex(String sex);
        //设置一句话描述
        void setResume(String resume);
        //设置生日
        void setBirthday(String birthday);
        //加载头像
        void loadHeadImg(String urlImg);
        //加载头像
        void setLocation(String location);
        //finish掉当前界面
        void finishCurrentModifyUserActivity();
        //
        void showNicknameError(String msg);
        //
        void showResumeError(String msg);
        //
        void initInfos(User user);
    }
}
